<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
</body>
<script>
    
    let canvas = document.getElementById('canvas');         // 获取canvas
    if(canvas.getContext) {         // 得到canvas的context(语境)
        console.log('你的浏览器支持canvas画布');
    } else {
        console.log('你的浏览器不支持canvas画布');
    }

</script>
</html>